/**
 * 
 */
package com.et114.modules.products.brands.dao;

import java.util.List;

import com.et114.components.simpletable.DataList;
import com.et114.modules.products.brands.vo.Brand;
import com.et114.components.simpletable.dao.SimpleTableDAOImpl;
/*
 * @author guanhw
 */
public class BrandDao extends SimpleTableDAOImpl {
	
	public DataList getBrands ( Brand vo ) throws Exception {
		return queryListDataList( vo , "getBrand" ) ; 
	}
	
	@ SuppressWarnings ( "unchecked" )
	public List< Brand > getBrandList( Brand vo ) throws Exception {
		return  queryList( vo , "getBrandNPage" ) ;
	}
	
	
	public Brand getBrandById( Long brandId ) throws Exception {
		return ( Brand ) load( brandId , "getBrandById" ) ;
	}
	
	public Long saveBrand( Brand vo ) throws Exception {
		return ( Long  ) insert( vo , "insertBrand" ) ; 
	}
	
	public void updateBrand( Brand vo ) throws Exception {
		update( vo , "updateBrand" ) ; 
	}
	
	public void removeBrandById( Long brandId ) throws Exception {
		delete( brandId , "removeBrandById" ) ; 
	}
	
	
}
